Gui that calls another gui, and open several modules

Hi!
I'm creating a dxl, a big dxl.

One of problems is that I don't know how to open in exclusive edit the modules that i selected from the list (in the code in the attached file)
And more important than that to me now right now is to call a gui from a gui, i don't have ideia of how to do it
i tried the #include but it does not work.
->the part of the button Init Completeness Validation.

And i'm not seeing what is missing or wrong.

I will be sending both scripts, if anyone have the time the help me out, i will be glad, i will keep trying to figure it out.
Bruwbruw - Fri Jun 22 13:45:14 EDT 2012

Re: Gui that calls another gui, and open several modules
Gedinfo - Mon Jun 25 07:15:05 EDT 2012

To open a module in exclusive edit:
Module m = edit("FileName", false) // open the current module for reading/editing

Re: Gui that calls another gui, and open several modules
llandale - Mon Jun 25 13:30:01 EDT 2012

I didn't read your code.

My code that edit's modules does this:
  • mod = edit(NameMod, false, true, true) // invisible, do not prompt on failure, load standard view
  • if (null mod or !isEdit(mod)) //
  • then deal with it
  • else proceed to use mod; finally close(mod, true)

You invoke a Dialog from within another Dialog the same way as the original Dialog, the problem comes in when you try to get information from the sub onto the main. Since the job of the 2nd one is almost always to get more information for the 1st, I routinely "block" the 2nd one; which prevents interaction with the 1st one until the 2nd one closes. You could then have the "close" of the 2nd one either /[1] update the 1st dialog directly, or /[2] store the return value in a global variable and let the 1st dialog (after the "block") update itself.

If the 2nd dialog is in some other file, yes it is difficult to "#include" it since it usually uses "global" variables that are no longer global when #included in a callback.

-Louie

Re: Gui that calls another gui, and open several modules
Mathias Mamsch - Wed Jun 27 06:25:42 EDT 2012

llandale - Mon Jun 25 13:30:01 EDT 2012
I didn't read your code.

My code that edit's modules does this:

  • mod = edit(NameMod, false, true, true) // invisible, do not prompt on failure, load standard view
  • if (null mod or !isEdit(mod)) //
  • then deal with it
  • else proceed to use mod; finally close(mod, true)

You invoke a Dialog from within another Dialog the same way as the original Dialog, the problem comes in when you try to get information from the sub onto the main. Since the job of the 2nd one is almost always to get more information for the 1st, I routinely "block" the 2nd one; which prevents interaction with the 1st one until the 2nd one closes. You could then have the "close" of the 2nd one either /[1] update the 1st dialog directly, or /[2] store the return value in a global variable and let the 1st dialog (after the "block") update itself.

If the 2nd dialog is in some other file, yes it is difficult to "#include" it since it usually uses "global" variables that are no longer global when #included in a callback.

-Louie

If you want to to 'switch' to another dialog which is a completly separate application, then you can do from your callback:
 

...
        release yourDialog     // if you blocked it 
        // destroy yourDialog  // do NEVER call destroy in a callback!
        hide yourDialog        // if you showed it
    eval_ "#include <...your other dialog application...>"
        halt
        ...

 


Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

Re: Gui that calls another gui, and open several modules
Bruwbruw - Thu Jun 28 08:46:17 EDT 2012

Mathias Mamsch - Wed Jun 27 06:25:42 EDT 2012

If you want to to 'switch' to another dialog which is a completly separate application, then you can do from your callback:
 

...
        release yourDialog     // if you blocked it 
        // destroy yourDialog  // do NEVER call destroy in a callback!
        hide yourDialog        // if you showed it
    eval_ "#include <...your other dialog application...>"
        halt
        ...

 


Regards, Mathias

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

The eval_ function worked, thank you.
Did you guys known if this possible to call the BaselineSet function from a GUI?
Anyway, thanks again for the help!

Re: Gui that calls another gui, and open several modules
Mathias Mamsch - Fri Jun 29 18:42:40 EDT 2012

Bruwbruw - Thu Jun 28 08:46:17 EDT 2012
The eval_ function worked, thank you.
Did you guys known if this possible to call the BaselineSet function from a GUI?
Anyway, thanks again for the help!

Yes (nearly) everything you can do in DOORS you can do from DXL (and also from a GUI). Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS